package com.karry.yl.service.baseinfo.impl;

import com.karry.commons.base.impl.SuperServiceImpl;
import com.karry.yl.dao.baseinfo.OrganizationMapper;
import com.karry.yl.domain.baseinfo.Organization;
import com.karry.yl.service.baseinfo.OrganizationService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


@Service
public class OrganizationServiceImpl extends SuperServiceImpl<OrganizationMapper,Organization> implements OrganizationService {

    @Override
    public List<Map<String, Object>> selectMZOrg() {
        return baseMapper.selectMZOrg();
    }

    @Override
    @Transactional
    public void bindPrimary(Organization primary, Organization org) {
        this.updateById(org);
        this.updateById(primary);
    }

}
